package method;


public class GMethodTest {

    public static void main(String[] args) {
        Double[] scores = { 8.0, 9.2, 10.0, 3.0, 4.0, 6.0 };
        System.out.println(new ArrayAlg().<Double>getMiddle(scores));
    }
}


class ArrayAlg {

    public <T> T getMiddle(T[] array) {
        return array[array.length / 2];
    }
}
